using System;

namespace Open.Data.Persistence
{
    public class PersistenceException : System.Exception
    {
		public PersistenceException(string message) : base(message)
		{}

        public PersistenceException(string message, Exception innerException)
            : base(message, innerException)
        {}
    }

    public class TableException : PersistenceException
    {
        public TableException(string message): base(message)
        {}
    }	

	public class ConditionException : PersistenceException
	{
		public ConditionException(string message) : base(message)
		{}
	}	

	public class ConditionsException : PersistenceException
	{
		public ConditionsException(string message) : base(message)
		{}
	}

	public class SortException : PersistenceException
	{
		public SortException(string message) : base(message)
		{}
	}

	public class QueryException: PersistenceException
	{
		public QueryException(string message) : base(message)
		{}
	}

    public class ViewException : System.Exception
    {
        public ViewException(string message): base(message)
        { }
    }

	public class DuplicateKeyException: PersistenceException
	{
		public DuplicateKeyException(string message) : base(message)
		{}
	}

	public class RecordNotFoundException: PersistenceException
	{
		public RecordNotFoundException(string message) : base(message)
		{}
	}

    public class ReferenceException : PersistenceException
    {
        public ReferenceException(string message): base(message)
        { }
        public ReferenceException(string message, Exception innerException): base(message, innerException)
        { }
    }

    public class ConcurrencyException : PersistenceException
    {
        public ConcurrencyException(string message) : base(message)
        {}
    }

    public class DataBinderException : PersistenceException
    {
        public DataBinderException(string message): base(message)
        {}
    }

    public class ReflectionCacheException : PersistenceException
    {
        public ReflectionCacheException(string message)
            : base(message)
        { }
    }

    public class ContextException : PersistenceException
    {
        public ContextException(string message)
            : base(message)
        { }
        public ContextException(string message, Exception exception)
            : base(message, exception)
        { }
    }

    public class CommandException : PersistenceException
    {
        public CommandException(string message)
            : base(message)
        { }

        public CommandException(string message, Exception exception)
            : base(message, exception)
        { }
    }

    public class FormatterException : PersistenceException
    {
        public FormatterException(string message)
            : base(message)
        { }
    }

    public class QueryDataAdapterException : PersistenceException
    {
        public QueryDataAdapterException(string message)
            : base(message)
        { }
    }

    public class DeploymentException : PersistenceException
    {
        public DeploymentException(string message)
            : base(message)
        { }
        public DeploymentException(string message, Exception exception)
            : base(message, exception)
        { }
    }

    public class TypeDeploymentException : PersistenceException
    {
        public TypeDeploymentException(string message)
            : base(message)
        { }
        public TypeDeploymentException(string message, Exception exception)
            : base(message, exception)
        { }
    }
}
